package com.secret.controller;

import com.alibaba.fastjson.JSONObject;
import com.secret.core.aop.Seeker;
import com.secret.core.common.Result;
import com.secret.core.constant.AESConstant;
import com.secret.dao.dto.UserSelectDto;
import com.secret.dao.entity.testUser;
import com.secret.dao.vo.UserSelectVo;
import com.secret.manager.aes.MyAESUtil;
import com.secret.service.UserService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class PictureController {

    @Resource
    private UserService userService;

//    @PostMapping("/test1")
//    public Result GetMapping1(UserSelectVo userSelectVo) throws Exception{
//       return userService.login(userSelectVo);
//    }
    @PostMapping("/test2")
    public String GetMapping2(UserSelectDto userSelectDto) throws Exception{
        String a= JSONObject.toJSONString(userSelectDto);
        return MyAESUtil.Encrypt(a, AESConstant.AES_KEY_VO);
    }
//    @ApiModelProperty("新增用户接口")
//    @PostMapping("/insert")
//    public Result insertUser(String openId) throws Exception{
//        return userService.insertUser(openId);
//    }

    @ApiModelProperty("获取图片链接")
    @PostMapping("/getObject")
    public Result getObject() throws Exception{
    return null;
    }
}
